// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-model.ts.hbs生成
import { IEditFormModel, IFormStore, IParam } from '@/core';
function getModel(): IEditFormModel {
	return {
		name: 'form',
		caption: '',
		codeName: 'Main',
		enableAutoSave: false,
		entityCodeName: 'OAUTH_CLIENT_DETAILS',
		keyPSAppDEField: 'Client_id',
		majorPSAppDEField: 'Client_id',
		cssName: '',
		controlType: 'FORM',
		formStyle: '',
		valueRule: getValueRule(),
		createDefaultItems: getCreateDefaultItems(),
		updateDefaultItems: getUpdateDefaultItems(),
		detailModel: getDetailModel(),
		uiEngineModel: [
			{
				name: 'engine_form',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWENGINE',
				eventNames: 'LOAD;SAVE;REMOVE',
				scriptCode: ``,
				entityCodeName: '',
				logicName: ``,
			},
		],
	};
}
function getValueRule() {
	return [];
}

function getCreateDefaultItems() {
	return [];
}

function getUpdateDefaultItems() {
	return [];
}
function getDetailModel() {
	return {
		formpage1: {
			caption: '基本信息',
			captionItemName: '',
			name: 'formpage1',
			codeName: 'formpage1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMPAGE',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
		},
		group1: {
			caption: 'oauth客户端信息基本信息',
			captionItemName: '',
			name: 'group1',
			codeName: 'group1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'GROUPPANEL',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			showMoreItems: [],
		},
		client_name: {
			caption: '应用名称',
			captionItemName: '',
			name: 'client_name',
			codeName: 'client_name',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Client_name',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 24, colMD: 24 },
		},
		grouppanel1: {
			caption: '',
			captionItemName: '',
			name: 'grouppanel1',
			codeName: 'grouppanel1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'GROUPPANEL',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			showMoreItems: [],
		},
		client_id: {
			caption: 'client_id',
			captionItemName: '',
			name: 'client_id',
			codeName: 'client_id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Client_id',
			dataType: '25',
			required: false,
			enableCond: 1,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 11, colMD: 11 },
		},
		client_secret: {
			caption: 'client_secret',
			captionItemName: '',
			name: 'client_secret',
			codeName: 'client_secret',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Client_secret',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 11, colMD: 11 },
		},
		generateclientsecret: {
			caption: '生成密钥',
			captionItemName: '',
			name: 'generateclientsecret',
			codeName: 'generateclientsecret',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'BUTTON',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			formItemUpdate: {
				showBusyIndicator: 'true',
				appDEMethod: 'GenerateClientSecret',
				updateDetails: ['client_secret'],
			},
		},
		web_server_redirect_uri: {
			caption: '认证地址',
			captionItemName: '',
			name: 'web_server_redirect_uri',
			codeName: 'web_server_redirect_uri',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Web_server_redirect_uri',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colMD: 24 },
		},
		authorized_grant_types: {
			caption: '授权方式',
			captionItemName: '',
			name: 'authorized_grant_types',
			codeName: 'authorized_grant_types',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Authorized_grant_types',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			codeListTag: 'oauth2__Oauth2_grant_types',
			layout: { parentLayout: 'TABLE_24COL', colMD: 24 },
		},
		grouppanel3: {
			caption: '',
			captionItemName: '',
			name: 'grouppanel3',
			codeName: 'grouppanel3',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'GROUPPANEL',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			showMoreItems: [],
		},
		scope: {
			caption: '作用域',
			captionItemName: '',
			name: 'scope',
			codeName: 'scope',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Scope',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			codeListTag: 'oauth2__Oauth2_grant_scope',
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		autoapprove: {
			caption: '自动批准授予权限',
			captionItemName: '',
			name: 'autoapprove',
			codeName: 'autoapprove',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Autoapprove',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			codeListTag: 'oauth2__Oauth2_grant_scope',
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		authorities: {
			caption: '权限资源',
			captionItemName: '',
			name: 'authorities',
			codeName: 'authorities',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Authorities',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			editRules: {
				editorType: 'TEXTAREA_10',
			},
			layout: { parentLayout: 'TABLE_24COL', colMD: 24 },
		},
		grouppanel2: {
			caption: '',
			captionItemName: '',
			name: 'grouppanel2',
			codeName: 'grouppanel2',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'GROUPPANEL',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			showMoreItems: [],
		},
		access_token_validity: {
			caption: 'accessToken有效期',
			captionItemName: '',
			name: 'access_token_validity',
			codeName: 'access_token_validity',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Access_token_validity',
			dataType: '9',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			editRules: {
				editorType: 'TEXTBOX',
			},
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		refresh_token_validity: {
			caption: 'refreshToken有效期',
			captionItemName: '',
			name: 'refresh_token_validity',
			codeName: 'refresh_token_validity',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Refresh_token_validity',
			dataType: '9',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			editRules: {
				editorType: 'TEXTBOX',
			},
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
	};
}
export const model = getModel();
